<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class PurchaseGoods extends Validate
{
    protected $rule = ['goods_name' => 'require','goods_info' => 'require',
    ];

    protected $message = ['goods_name.require' => '商品名称为必填项','goods_info.require' => '商品说明为必填项','status.require' => '状态：1正常,2禁用 默认1为必填项','status.number' => '状态：1正常,2禁用 默认1需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['goods_name','goods_info','status',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['goods_name','goods_info','status',]);
    }
}
